package br.com.sysmap.calcci;

/**
 *
 * @author Marcos Junqueira - marcos.junqueira at sysmap.com.br
 */
public class CalculadoraSimples {

    public Double soma( Double n1, Double n2 ) {
        return n1 + n2;
    }

    public Double subtrai( Double n1, Double n2 ) {
        return n1 - n2;
    }

    public Double multiplica( Double n1, Double n2 ) {
        return n1 * n2;
    }

    public Double divide( Double n1, Double n2 ) throws DivisaoPorZeroException {
        if ( n2 == 0 ) {
            throw new DivisaoPorZeroException();
        }
        return n1 / n2;
    }
}
